home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
loginout
/
stuff.arc
/
STUFF.C
next >
Wrap
Text File
|
1989-03-27
|
612b
|
26 lines
#include <stdio.h>
main(int argc, char *argv[])
{
char *text,*filename; /* text is the text to put in the file */
FILE *infile,*ret; /* filename is 1st arg, FILE is filehandle */
printf("STUFF v0.9 3/27/89 copyright Gabe J. Feder, & PaineWebber, Inc.\n");
if(argc>=3)
{
filename=argv[1];
text=argv[2];
}
else
{
printf("Incorrect syntax.\nTry STUFF <filename> '<text>'\n");
exit(1);
}
infile=fopen(filename,"w");
if(infile==NULL){
printf("Error opening the file.\n");
exit(2);
}
fprintf(infile,"%s\015",text);
fclose(infile);
}